Expand description

A small library meant to be used as a build dependency with Cargo for easily integrating ISPC code into Rust projects. The ispc_rt crate is specifically targetted at linking with a previously compiled ISPC library and generated bindings (built with ispc_compile), to allow end users to link ISPC code without needing the ISPC compiler or clang.

This crate also includes the various runtime components for the ISPC language, including the parallel task system and performance instrumentation.

Re-exports

pub use crate::exec::Parallel;
pub use crate::exec::TaskSystem;
pub use crate::instrument::Instrument;
pub use crate::instrument::SimpleInstrument;
pub use crate::task::ISPCTaskFn;

Modules

Defines the trait that must be implemented by ISPC task execution systems and provides a default threaded one for use.

Defines the trait that must be implemented by ISPC instrumentation callbacks structs and provides a default one.

Defines structs for operating on ISPC task groups and getting chunks of a task to be scheduled on to threads

Macros

Convenience macro for generating the module to hold the raw/unsafe ISPC bindings.

Structs

A PackagedModule refers to an ISPC module which was previously built using ispc_compile, and is now distributed with the crate.

Functions

Print out a summary of performace data gathered from instrumenting ISPC. Must enable instrumenting to have this record and print data, see Config::instrument.

If you have implemented your own instrument for logging ISPC performance data you can use this function to provide it for use instead of the default one. This function must be called before calling into ISPC code, otherwise the instrumenter will already be set to the default.

If you have implemented your own task system you can provide it for use instead of the default threaded one. This must be done prior to calling ISPC code which spawns tasks otherwise the task system will have already been initialized to Parallel, which you can also see as an example for implementing a task system.